/*
 * sensor.h
 *
 */

#ifndef SRC_SENSOR_H_
#define SRC_SENSOR_H_

#include <stdint.h>

#define USE_CMD_BUF		1 //是否使用 sensor.c 里定义的 cmd_buf

#define SENSOR_PM_Sps30	0	//TVOC+PM
#define SENSOR_O3		1	//O3
#define SENSOR_NO2		2	//NO2+CO

typedef struct
{
	  uint32_t PM25µg;
	  uint32_t PM10µg;
	  uint32_t PM25cm;
	  uint32_t PM10cm;
	  uint16_t O3_data_ug;
	  uint16_t O3_data_ppb;
	  uint16_t NO2_data_mg;
	  uint16_t NO2_data_ppm;
	  uint16_t Decimal;
} Uart_Sensors;

void sensor_init(uint8_t type);
void sensor_loop(uint8_t type);

#if USE_CMD_BUF
void sensor_set_data(const uint8_t* data, int length);
#endif

#endif /* SRC_SENSOR_H_ */
